var txt = document.getElementsByClassName('cd-text');
function getTime(){
	var now = new Date();
	var nMon = now.getMonth();
	var nDay = now.getDate();
	var nHour = now.getHours();
	var nMin = now.getMinutes();
	var nSec = now.getSeconds();
	var will = new Date(2019,nMon,nDay+1,0,0,0);
	var time = will-now;
	var hour = parseInt(time%86400000/3600000);
	var min = parseInt(time%3600000/60000);
	var sec = parseInt(time%60000/1000);
	if (sec<10) {
		sec = '0'+sec;
	}
	if (min<10) {
		min = '0'+min;
	}
	if (hour<10) {
		hour = '0'+hour;
	}
	txt[0].innerHTML = hour;
	txt[1].innerHTML = min;
	txt[2].innerHTML = sec;
}
getTime();
setInterval(getTime,1000);

